package com.qf.service.impl;

import com.qf.entity.Employee;
import com.qf.mapper.EmoployeeMapper;
import com.qf.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * @Author cuicui
 * @Description
 * @Date 2025-8-9
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private EmoployeeMapper employeeMapper;

    @Override
    public List<Employee> findAllEmployee() {
        List<Employee> allEmployee = employeeMapper.findAllEmployee();
        return allEmployee;
    }



    @Override
    public List<Employee> findEmployeeByCondition(String ename, String job) {
        List<Employee> employeeByCondition = employeeMapper.findEmployeeByCondition(ename, job);
        return employeeByCondition;
    }

    @Override
    public int addEmployee(Employee employee){
        int i = employeeMapper.addEmployee(employee);
        return i;
    }

    @Override
    public int deleteEmployee(int empno) {
        int i = employeeMapper.deleteEmployee(empno);
        return i;
    }


    @Override
    public int updateEmployee(Employee employee) {
        int i = employeeMapper.updateEmployee(employee);
        return i;
    }
}
